package org.summer.lawyer.pay.client;

import org.summer.lawyer.domain.bo.payorder.PayOrderBo;
import org.summer.lawyer.domain.bo.payrefund.PayRefundBo;
import org.summer.lawyer.domain.bo.paytransfer.PayTransferBo;
import org.summer.lawyer.domain.vo.payorder.PayOrderVo;
import org.summer.lawyer.domain.vo.payrefund.PayRefundVo;
import org.summer.lawyer.domain.vo.paytransfer.PayTransferVo;

import java.util.Map;

/**
 * 支付客户端，包含支付，退款等功能
 */
public interface PayClient {

    /**
     * 通道号Id
     */
    Long getId();

    /**
     * 支付下单
     * @date  2024-06-22
     * @param bo 下单信息
     * @return 支付订单信息
     */
    PayOrderVo unifiedPay(PayOrderBo bo);

    /**
     * 解析 order 回调数据
     */
    PayOrderVo parseOrderNotify(Map<String, String> params, String body);

    /**
     * 获取支付订单信息
     */
    PayOrderVo getPayOrder(String payNo);

    /**
     * 退款
     */
    PayRefundVo unifiedRefund(PayRefundBo bo);

    /**
     * 解析退款回调数据
     */
    PayRefundVo parseRefundNotify(Map<String, String> params, String body);

    /**
     * 获取退款订单信息
     */
    PayRefundVo getPayRefund(String refundNo, String payNo);

    /**
     * 转账
     */
    PayTransferVo unifiedTransfer(PayTransferBo bo);

    /**
     * 转账订单号
     */
    PayTransferVo getPayTransfer(String transferBatchNo, String transferNo);

    PayTransferVo parseTransferNotify(Map<String, String> params, String body);

}
